3.1575 \(\int \frac{\left (a+\frac{b}{x}\right )^3}{x} \, dx\)

Optimal. Leaf size=37 \[ a^3 \log (x)-\frac{3 a^2 b}{x}-\frac{3 a b^2}{2 x^2}-\frac{b^3}{3 x^3} \]

[Out]

-b^3/(3*x^3) - (3*a*b^2)/(2*x^2) - (3*a^2*b)/x + a^3*Log[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0425869, antiderivative size = 37, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.154 \[ a^3 \log (x)-\frac{3 a^2 b}{x}-\frac{3 a b^2}{2 x^2}-\frac{b^3}{3 x^3} \]

Antiderivative was successfully verified.

[In]  Int[(a + b/x)^3/x,x]

[Out]

-b^3/(3*x^3) - (3*a*b^2)/(2*x^2) - (3*a^2*b)/x + a^3*Log[x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 7.992, size = 34, normalized size = 0.92 \[ a^{3} \log{\left (x \right )} - \frac{3 a^{2} b}{x} - \frac{3 a b^{2}}{2 x^{2}} - \frac{b^{3}}{3 x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+b/x)**3/x,x)

[Out]

a**3*log(x) - 3*a**2*b/x - 3*a*b**2/(2*x**2) - b**3/(3*x**3)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0061008, size = 37, normalized size = 1. \[ a^3 \log (x)-\frac{3 a^2 b}{x}-\frac{3 a b^2}{2 x^2}-\frac{b^3}{3 x^3} \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b/x)^3/x,x]

[Out]

-b^3/(3*x^3) - (3*a*b^2)/(2*x^2) - (3*a^2*b)/x + a^3*Log[x]

_______________________________________________________________________________________

Maple [A]  time = 0.01, size = 34, normalized size = 0.9 \[ -{\frac{{b}^{3}}{3\,{x}^{3}}}-{\frac{3\,a{b}^{2}}{2\,{x}^{2}}}-3\,{\frac{{a}^{2}b}{x}}+{a}^{3}\ln \left ( x \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+b/x)^3/x,x)

[Out]

-1/3*b^3/x^3-3/2*a*b^2/x^2-3*a^2*b/x+a^3*ln(x)

_______________________________________________________________________________________

Maxima [A]  time = 1.43989, size = 46, normalized size = 1.24 \[ a^{3} \log \left (x\right ) - \frac{18 \, a^{2} b x^{2} + 9 \, a b^{2} x + 2 \, b^{3}}{6 \, x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^3/x,x, algorithm="maxima")

[Out]

a^3*log(x) - 1/6*(18*a^2*b*x^2 + 9*a*b^2*x + 2*b^3)/x^3

_______________________________________________________________________________________

Fricas [A]  time = 0.217569, size = 50, normalized size = 1.35 \[ \frac{6 \, a^{3} x^{3} \log \left (x\right ) - 18 \, a^{2} b x^{2} - 9 \, a b^{2} x - 2 \, b^{3}}{6 \, x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^3/x,x, algorithm="fricas")

[Out]

1/6*(6*a^3*x^3*log(x) - 18*a^2*b*x^2 - 9*a*b^2*x - 2*b^3)/x^3

_______________________________________________________________________________________

Sympy [A]  time = 1.35708, size = 34, normalized size = 0.92 \[ a^{3} \log{\left (x \right )} - \frac{18 a^{2} b x^{2} + 9 a b^{2} x + 2 b^{3}}{6 x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+b/x)**3/x,x)

[Out]

a**3*log(x) - (18*a**2*b*x**2 + 9*a*b**2*x + 2*b**3)/(6*x**3)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.225378, size = 47, normalized size = 1.27 \[ a^{3}{\rm ln}\left ({\left | x \right |}\right ) - \frac{18 \, a^{2} b x^{2} + 9 \, a b^{2} x + 2 \, b^{3}}{6 \, x^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a + b/x)^3/x,x, algorithm="giac")

[Out]

a^3*ln(abs(x)) - 1/6*(18*a^2*b*x^2 + 9*a*b^2*x + 2*b^3)/x^3